$(document).ready(function() {
	
	$('#loginAccount').focus();
	
	
	
	$.extend($.gritter.options, { 
			fade_in_speed: 400 // how fast notifications fade in (string or int)
	});
	
	$.gritter.add({
				// (string | mandatory) the heading of the notification
				title: 'welcome',
				// (string | mandatory) the text inside the notification
				text: '您可以从<a href="xregister.action" style="color:#ccc">这里</a> 注册 <br><br>如果您是新注册的用户，请等待审批',
				// (string | optional) the image to display on the left
				//image: 'http://a0.twimg.com/profile_images/59268975/jquery_avatar_bigger.png',
				// (bool | optional) if you want it to fade out on its own or just sit there
				sticky: false, 
				// (int | optional) the time you want it to be alive for before fading out
				time: '999999'
	});
	
	return false;
})



function check() {
	var loginAccount = $.trim($('#loginAccount').val());
	
	if ('' == loginAccount) {
		$.messager.alert('确定', '<br /><b>请填写您的姓名</b>', 'warning');
		
		return false;
	}
	
	
	var password = $('#password').val();
	
	if ('' == password) {
		$.messager.alert('确定', '<br /><b>请填写您的密码</b>', 'warning');
		
		return false;
	}
}